<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/include/TagLib.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb18030">
<title> ${mailDetail.title}- QQ邮箱</title>
<link rel="stylesheet" type="text/css" href="<c:url value='/index_files/comm20100f8062.css' />">
<link rel="stylesheet" type="text/css" href="<c:url value='/index_files/getcss.css' />">
<link rel="stylesheet" type="text/css" href="<c:url value='/index_files/readmail20120f6e54.css' />">
<script language="javascript" src="<c:url value='/js/jquery-1.4.2.min.js' />"></script>
<script language="javascript"  src="<c:url value='/js/Valid.js' />"></script>
<script type="text/javascript">
   //下载文件 
   function downLoad(savename){
	   downframe.document.form1.fileName.value = savename;
	   downframe.document.form1.submit();
	}
	//删除/彻底删除
	function operatMailDetail(state,mailsign){
		location.href="<c:url value='/saveMailDetail.do' />?pageNo=${page.currentPageNo}&state="+state+"&idMailDetails=${mailDetail.idMailDetail}&curstate=${mailDetail.state}&mailSign="+mailsign;
	}
	//标志为/移动到
	function operatSelectMailDetail(obj,type){
	    var value=$(obj).val();
	    if(value!=''){
		    if(type==1){
				location.href="<c:url value='/saveMailDetail.do' />?pageNo=${page.currentPageNo}&mailSign="+value+"&idMailDetails=${mailDetail.idMailDetail}&curstate=${mailDetail.state}";
			}else{
				location.href="<c:url value='/saveMailDetail.do' />?pageNo=${page.currentPageNo}&state="+value+"&idMailDetails=${mailDetail.idMailDetail}&curstate=${mailDetail.state}";
			}
		}
	}
	//回复
	function reply(){
		location.href="<c:url value='/reply.do' />?idMailDetail=${mailDetail.idMailDetail}";
	}
	//全部回复
	function replyAll(){
		location.href="<c:url value='/replyAll.do' />?idMailDetail=${mailDetail.idMailDetail}";
	}
	//转发
	function forwardingMail(){
 		location.href="<c:url value='/intoForwardingMail.do' />?idMailDetail=${mailDetail.idMailDetail}";
	}
</script>
</head>
<body context="ZL3702-pimGbDDgaOrzb38voyCkb28" module="qmReadMail"
		style="background: #fff; color: #000; font-size: 12px; font-weight: normal; font-family: 'lucida Grande', Verdana; padding: 0 7px 6px 4px; margin: 0;"
		class="">
		<div class="mailcontainer" id="qqmail_mailcontainer">
			<!-- 用户档案信息 -->
			<div id="mainmail" style="position:relative;z-index:1;">
				<!-- 邮件主体 -->
				<div class="toolbg toolbgline toolheight" style="position: relative; z-index: 2;">
					<div class="nowrap qm_left">
						<input type="button" class="qm_btn wd1 btn_true nowrap btn_goback" ck="goback" value="<<返回" onClick="history.go(-1);">
						<input type="button" class="btn_sepline">
						<input name="replay" type="button" class="qm_btn wd1" value="回复" ck="optMail" opt="reply" onClick="reply();">
						<input name="replayAll" type="button" class="qm_btn wd2" value="回复全部" ck="optMail" opt="replayAll" onClick="replyAll();">
						<input name="fw" type="button" class="qm_btn wd1" value=" 转发 " onclick="forwardingMail();">
						<c:if test="${mailDetail.state!=4}">
						<input name="del" type="button" id="quick_del" class=" wd1 btn" value="删除" onclick="operatMailDetail(4,'')">
						</c:if>
						<input name="PerDel" id="quick_completelydel" type="button" class="qm_btn wd2" value="彻底删除" onClick="operatMailDetail('6','');">
						<div id="markContainer" name="markContainer" style="float: left; width: 80px; margin: 2px 0 0 1px;">
							 <select id="mailsign" name="mailsign" onChange="operatSelectMailDetail(this,1)">
							 	<option value="">标记为...</option>
							 	<option value="1">已读标志</option>
							 	<option value="0">未读标志</option>
							 </select>
						</div>
						<div id="selmContainer" name="selmContainer" style="float: left; width: 80px; margin: 2px 6px 0 8px; _margin: 2px 0 0 1px;">
							 <select id="state" name="state" onChange="operatSelectMailDetail(this,2)">
							 	<option value="">移动到...</option>
							 	<option value="1">收件夹</option>
							 	<option value="2">草稿箱</option>
							 	<option value="3">已发送</option>
							 	<option value="4">已删除</option>
							 	<option value="5">垃圾邮件</option>
							 </select>
						</div>
					</div>
					<div class="clr"></div>
				</div>
				<div class="readmailinfo"
					style="position: relative; z-index: 2; zoom: 1;">
					<table style="height: 24px" border="0" cellspacing="0"
						cellpadding="0">
						<tbody>
							<tr>
								<td height="24" valign="middle"
									style="word-break: break-all; padding: 9px 8px 2px 14px;"
									class="txt_left settingtable readmail_subject">
									<div class="qm_left" style="padding-bottom: 3px;">
										<span id="subject" class="sub_title ">${mailDetail.title}</span>
										<input type="button" id="img_star" ck="starMail"
											class="qm_ico_flagoff" title="标为星标" hidefocus="">
									</div>
									<div class="clr"></div>
								</td>
							</tr>
						</tbody>
					</table>
					<table border="0" cellspacing="0" cellpadding="0">
						<tbody>
							<tr>
								<td style="padding-left: 14px;" class="settingtable txt_left">
									<span class="addrtitle">发件人：</span>
									 ${mailDetail.sendPeople}
								</td>
							</tr>
						</tbody>
					</table>
					<table border="0" cellspacing="0" cellpadding="0">
						<tbody>
							<tr>
								<td
									style="word-break: break-all; padding: 2px 12px 0 14px; line-height: 19px;"
									width="99%" class="settingtable txt_left">
									<span class="addrtitle">时&nbsp;&nbsp;&nbsp;间：</span>
									<b class="tcolor">${lastdate}</b>
								</td>
							</tr>
							<tr>
								<td style="padding: 0 0 0 14px; line-height: 19px;" class="settingtable txt_left">
									<div>
										<div class="addrtitle nowrap" style="position: absolute;">
											收件人：
										</div>
										<div style="padding-left: 48px; font-size: 12px; overflow: hidden; zoom: 1;">
											 ${mailDetail.recPeople}
										</div>
									</div>
									<c:if test="${not empty mailDetail.copySend}">
									<div>
										<div class="addrtitle nowrap" style="position: absolute;">
											抄送：
										</div>
										<div style="padding-left: 48px; font-size: 12px; overflow: hidden; zoom: 1;">
											 ${mailDetail.copySend}
										</div>
									</div>
									</c:if>
									<c:if test="${not empty mailAnnexList}">
									<div style="margin-top: 1px;">
										<div class="addrtitle nowrap" style="position: absolute;">
											附&nbsp;&nbsp;&nbsp;件：
										</div>
										<div style="padding-left: 48px; font-size: 12px; overflow: hidden; height: 20px; _padding-top: 2px; _height: 17px;">
										    ${fn:length(mailAnnexList)}&nbsp;个
											<c:forEach items="${mailAnnexList}" var="mailAnnex" varStatus="order">
												(<a href="javascript:downLoad('${mailAnnex.filename}');"><img src="./index_files/icon_att0aa5d9.gif" align="absmiddle" class="showattch" border="0">${fn:substringAfter(mailAnnex.filename,'/')}${fn:length(mailAnnexList)>1?'&nbsp;等...':''}</a>)<br/>
											</c:forEach>
										</div>
									</div>
								   </c:if>
								</td>
							</tr>
						</tbody>
					</table>
				</div>
				<!-- 邮件主体 -->
				<div id="contentDiv" style="position: relative; font-size: 14px; height: auto; padding: 15px 15px 10px 15px; z-index: 1; zoom: 1; line-height: 1.7;" class="body">
					${mailDetail.content}
				</div>
			</div>
			<!-- 邮件主体 -->
			<div class="toolbg toolbgline toolheight" style="position: relative; z-index: 2;">
				<div class="nowrap qm_left">
					<input type="button" class="qm_btn wd1 btn_true nowrap btn_goback" ck="goback" value="<<返回" onClick="history.go(-1);">
					<input type="button" class="btn_sepline">
					<input name="replay" type="button" class="qm_btn wd1" value="回复" ck="optMail" opt="reply" onClick="reply();">
					<input name="replayAll" type="button" class="qm_btn wd2" value="回复全部" ck="optMail" opt="replayAll" onClick="replyAll();">
					<input name="fw" type="button" class="qm_btn wd1" value=" 转发 " onclick="forwardingMail();">
					<c:if test="${mailDetail.state!=4}">
					<input name="del" type="button" id="quick_del" class=" wd1 btn" value="删除" onclick="operatMailDetail(4,'')">
					</c:if>
					<input name="PerDel" id="quick_completelydel" type="button" class="qm_btn wd2" value="彻底删除" onClick="operatMailDetail('6','');">
					<div id="markContainer" name="markContainer" style="float: left; width: 80px; margin: 2px 0 0 1px;">
						 <select id="mailsign" name="mailsign" onChange="operatSelectMailDetail(this,1)">
						 	<option value="">标记为...</option>
						 	<option value="1">已读标志</option>
						 	<option value="0">未读标志</option>
						 </select>
					</div>
					<div id="selmContainer" name="selmContainer" style="float: left; width: 80px; margin: 2px 6px 0 8px; _margin: 2px 0 0 1px;">
						 <select id="state" name="state" onChange="operatSelectMailDetail(this,2)">
						 	<option value="">移动到...</option>
						 	<option value="1">收件夹</option>
						 	<option value="2">草稿箱</option>
						 	<option value="3">已发送</option>
						 	<option value="4">已删除</option>
						 	<option value="5">垃圾邮件</option>
						 </select>
					</div>
				</div>
				<div class="clr"></div>
			</div>
			</div>
		</div>
	</body>
	<iframe id="downframe" name="downframe" src="<c:url value='/include/NoData.jsp'/>" style="display:none"></iframe>
</html>